Bijection, injection and surjection

In mathematics, injections, surjections and bijections are classes of functions distinguished by the manner in which arguments (input expressions from the domain) and images (output expressions from the codomain) are related or mapped to each other.

A function maps elements from its domain to elements in its codomain.

\forall x, y \in A, f(x)=f(y) \Rightarrow x=y\ or, equivalently,
\forall x,y \in A, x \neq y \Rightarrow f(x) \neq f(y).\

An injective function is an injection.

\forall y \in B, \exists x \in A \text{ such that } y = f(x).\

A surjective function is a surjection.

An injective function need not be surjective (not all elements of the codomain may be associated with arguments), and a surjective function need not be injective (some images may be associated with more than one argument). The four possible combinations of injective and surjective features are illustrated in the following diagrams.

Contents

Injection

A function is injective (one-to-one) if every possible element of the codomain is mapped to by at most one argument. Equivalently, a function is injective if it maps distinct arguments to distinct images. An injective function is an injection. The formal definition is the following.

The function f: A \to B is injective iff for all a,b \in A, we have f(a) = f(b) \Rarr a = b.

Surjection

A function is surjective (onto) if every possible image is mapped to by at least one argument. In other words, every element in the codomain has non-empty preimage. Equivalently, a function is surjective if its image is equal to its codomain. A surjective function is a surjection. The formal definition is the following.

The function f: A \to B is surjective iff for all b \in B, there is a \in A such that f(a) = b.

Bijection

A function is bijective if it is both injective and surjective. A bijective function is a bijection (one-to-one correspondence). A function is bijective if and only if every possible image is mapped to by exactly one argument. This equivalent condition is formally expressed as follows.

The function f: A \to B is bijective iff for all b \in B, there is a unique a \in A such that f(a) = b.

Cardinality

Suppose you want to define what it means for two sets to "have the same number of elements". One way to do this is to say that two sets "have the same number of elements" if and only if all the elements of one set can be paired with the elements of the other, in such a way that each element is paired with exactly one element. Accordingly, we can define two sets to "have the same number of elements" if there is a bijection between them. We say that the two sets have the same cardinality.

Likewise, we can say that set A "has fewer than or the same number of elements" as set B if there is an injection from A to B. We can also say that set A "has fewer than the number of elements" in set B if there is an injection from A to B but not a bijection between A and B.

Examples

It is important to specify the domain and codomain of each function since by changing these, functions which we think of as the same may have different jectivity.

Injective and surjective (bijective)

Injective and non-surjective

Non-injective and surjective

Non-injective and non-surjective

Properties

Category theory

In the category of sets, injections, surjections, and bijections correspond precisely to monomorphisms, epimorphisms, and isomorphisms, respectively.

History

This terminology was originally coined by the Bourbaki group.

External links

See also